<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../JS/vue.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<ul>
				<li @mouseover="addClass($event)"  @mouseout="removeClass($event)">国内</li>
				<li @mouseover="addClass($event)"  @mouseout="removeClass($event)">国际</li>
				<li @mouseover="addClass($event)"  @mouseout="removeClass($event)">军事</li>
				<li @mouseover="addClass($event)"  @mouseout="removeClass($event)">娱乐</li>
			</ul>
		</div>
		
		<script type="text/javascript">
			var app = new Vue({
				el:'#app',
				methods:{
					addClass($event){
						$event.currentTarget.style.color='red'
					},
					removeClass($event){
						$event.currentTarget.removeAttribute('style')
					}
				}
			})
		</script>
	</body>
</html>
